import { Commit } from "vuex";

interface IFoodClass {
  api_id: string;
  icon: string;
  id: string;
  jump_url: string;
  name: string;
  original_id: string;
  s_type: number;
}
interface IFoodList {
  banner: string;
  cid: string;
  icon: string;
  id: string;
  jump_url: string;
  name: string;
  url: string;
  sub_class: Partial<IFoodClass>[];
}
interface IState {
  foods: Partial<IFoodList>[];
  list: any;
}
interface IFood {
  namespaced: boolean;
  state: IState;
  actions: {
    getFoodList: (
      { commit }: { commit: Commit },
      { params }: { params: any }
    ) => void;
    getFooditem: (
      { commit }: { commit: Commit },
      { name }: { cid: any; name: any }
    ) => void;
  };
  mutations: {
    GETFOODLIST: (
      state: IState,
      action: { type: string; payload: IFoodList[] }
    ) => void;
    GetFoodLisT: (
      state: any,
      action: {
        type: string;
        payload: any;
      }
    ) => void;
  };
}
export { IFood, IFoodList, IState, IFoodClass };
